package com.changanw.middleware.dynamic.thread.pool.types;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author changanw
 * @description 返回值信息
 * @date 2024/5/20 14:03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Response<T> implements Serializable {

  private static final long serialVersionUID = 3657474091057646675L;
  private String code;
  private String info;
  private T data;
  @AllArgsConstructor
  @NoArgsConstructor
  @Getter
  public enum Code {
    SUCCESS("0000", "调用成功"),
    UN_ERROR("0001", "调用失败"),
    ILLEGAL_PARAMETER("0002", "非法参数"),
    ;

    private String code;
    private String info;

  }
}
